import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'LoginUser',
      component: () => import('../views/LoginUser.vue'),
    },
   
    {
      path: '/MainView',
      name: 'MainView',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/MainView.vue'),
      children:[
        {
          path: '/AddUser',
          name: 'AddUser',
          component: () => import('../views/User/AddUser.vue'),
        },
        {
          path: '/ShowUser',
          name: 'ShowUser',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/User/ShowUser.vue'),
        },
        {
          path: '/AddRole',
          name: 'AddRole',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Role/AddRole.vue'),
        },
        {
          path: '/RoleShow',
          name: 'RoleShow',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Role/RoleShow.vue'),
        },
        {
          path: '/MenuList',
          name: 'MenuList',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Menu/MenuList.vue'),
        },
        {
          path: '/AddMenu',
          name: 'AddMenu',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Menu/AddMenu.vue'),
        },
        {
          path: '/AddRoleMenu',
          name: 'AddRoleMenu',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/RoleMenu/AddRoleMenu.vue'),
        },
        {
          path: '/AddLeave',
          name: 'AddLeave',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Leave/AddLeave.vue'),
        },
        {
          path: '/LeaveShow',
          name: 'LeaveShow',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Leave/LeaveShow.vue'),
        },
        {
          path: '/ApprovalView',
          name: 'ApprovalView',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Approval/ApprovalView.vue'),
        },
        {
          path: '/UpdateLeave',
          name: 'UpdateLeave',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Leave/UpdateLeave.vue'),
        },
        {
          path: '/xiangqinmg',
          name: 'xiangqinmg',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Leave/xiangqinmg.vue'),
        },
        {
          path: '/AddProduct',
          name: 'AddProduct',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Eatrabbit/Product/AddProduct.vue'),
        },
        {
          path: '/ShowProduct',
          name: 'ShowProduct',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Eatrabbit/Product/ShowProduct.vue'),
        },
        {
          path: '/xiangqing',
          name: 'xiangqing',
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('../views/Eatrabbit/Product/xiangqing.vue'),
          children:[
            {
              path: '/BreedView',
              name: 'BreedView',
              // route level code-splitting
              // this generates a separate chunk (About.[hash].js) for this route
              // which is lazy-loaded when the route is visited.
              component: () => import('../views/Eatrabbit/Onedragon/BreedView.vue'),
            },
            {
              path: '/Slaughter',
              name: 'Slaughter',
              // route level code-splitting
              // this generates a separate chunk (About.[hash].js) for this route
              // which is lazy-loaded when the route is visited.
              component: () => import('../views/Eatrabbit/Onedragon/Slaughter.vue'),
            },
            {
              path: '/Processing',
              name: 'Processing',
              // route level code-splitting
              // this generates a separate chunk (About.[hash].js) for this route
              // which is lazy-loaded when the route is visited.
              component: () => import('../views/Eatrabbit/Onedragon/Processing.vue'),
            },
           
          ]
        },
      ]
    },
   
   
   
  ],
})

export default router
